package com.itheima.mapper;

import io.swagger.v3.oas.models.responses.ApiResponse;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrdersettingMapper {
    @Update("UPDATE t_ordersetting SET number = #{number} WHERE orderDate = #{orderDate}")
    void updateNumberByOrderDate(String orderDate, String number);

    @Update("SELECT * FROM t_ordersetting WHERE DATE_FORMAT(orderDate, '%Y-%m') = #{month}")
    List<Map<String, Object>> findByMonth(@Param("month") String month);
}
